-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(store): add TS store events/ABI, move around exports #1034
Conversation
"event StoreSetField(bytes32 table, bytes32[] key, uint8 schemaIndex, bytes data)", | ||
"event StoreSetRecord(bytes32 table, bytes32[] key, bytes data)", | ||
"event StoreEphemeralRecord(bytes32 table, bytes32[] key, bytes data)", | ||
] as const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the main thing I wanted to import from another package into the browser bundle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice restructure, I prefer this regardless of #1025
|
||
const sortedStoreEventsAbi = storeEventsAbi.slice().sort((a, b) => a.name.localeCompare(b.name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slice()
feels unintuitive as a way to copy an array, [...storeEventsAbi]
would be immediately clear, to me at least
|
(pulled out of #1033)
Moves codegen into its own build/export, because we can't import from
@latticexyz/store
in the browser due to a node-only dependency, and I want to colocate TS definition of store events near the Solidity where they're defined.Once codegen got moved out, it felt a little weird that config was in "library" still, so I moved that out too, and then there wasn't much left, so I just got rid of the notion of "library" (which won't make much sense anyway once #1025 is done and "register" is removed)